Name "SERVIDOR HASSAR"
OutFile "Install_servidor_fiscal.exe"
InstallDir "$PROGRAMFILES\SERVIDOR FISCAL"
InstallDirRegKey HKLM "Software\EIPSistemas\SERVIDOR FISCAL" "InstallDir"

Page components
Page directory
Page instfiles

UninstPage uninstConfirm
UninstPage instfiles

Section "Servidor Fiscal 1.0.2 (Requerido)"
  SectionIn RO
  SetOutPath $INSTDIR
  
  File "AcercaDe.txt"
  File "servidor_fiscal.exe"
  File "ixbatch.exe"
  File "wspooler.exe"
  File "ixbatch.lic"
  File "winfis32.dll"
  
  WriteRegStr HKLM "Software\EIPSistemas\SERVIDOR FISCAL" "InstallDir" $INSTDIR
  
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SERVIDOR FISCAL" "DisplayName" "SERVIDOR FISCAL"
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SERVIDOR FISCAL" "UninstallString" '"$INSTDIR\uninstall.exe"'
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SERVIDOR FISCAL" "NoModify" 1
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SERVIDOR FISCAL" "NoRepair" 1
  
  WriteUninstaller "uninstall.exe"
SectionEnd
 
Section "Accesos Directos del Menu Inicio"
  SetShellVarContext all
  CreateDirectory "$SMPROGRAMS\SERVIDOR FISCAL"
  CreateShortCut "$SMPROGRAMS\SERVIDOR FISCAL\Desinstalar.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
  CreateShortCut "$SMPROGRAMS\SERVIDOR FISCAL\Acerca de.lnk" "$INSTDIR\AcercaDe.txt" "" "$INSTDIR\AcercaDe.txt" 0
  CreateShortCut "$SMPROGRAMS\SERVIDOR FISCAL\Servidor Fiscal.lnk" "$INSTDIR\servidor_fiscal.exe" "" "$INSTDIR\servidor_fiscal.exe" 0
  CreateShortCut "$SMSTARTUP\Servidor Fiscal.lnk" "$INSTDIR\servidor_fiscal.exe" "" "$INSTDIR\servidor_fiscal.exe" 0
  SectionEnd

Section "Uninstall"
  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SERVIDOR FISCAL"
  DeleteRegKey HKLM "Software\EIPSistemas\SERVIDOR FISCAL"

  Delete $INSTDIR\AcercaDe.txt
  Delete $INSTDIR\ixbatch.exe
  Delete $INSTDIR\servidor_fiscal.exe
  Delete $INSTDIR\wspooler.exe
  Delete $INSTDIR\ixbatch.lic
  Delete $INSTDIR\winfis32.dll
  Delete $INSTDIR\configuracion.dat
  Delete $INSTDIR\uninstall.exe

  Delete "$SMPROGRAMS\SERVIDOR FISCAL\*.*"
  Delete "$SMPROGRAMS\SERVIDOR FISCAL"
  Delete "$SMPROGRAMS\Inicio\Servidor Fiscal.lnk"
  Delete "$INSTDIR\*.*"
  Delete "$INSTDIR"
  SectionEnd
    
